---
title: Data model
description: "A quick overview of how Dub is structured."
---

import WorkspaceResponse from "/snippets/workspace-response.mdx";
import LinkResponse from "/snippets/link-response.mdx";
import DomainResponse from "/snippets/domain-response.mdx";
import TagResponse from "/snippets/tag-response.mdx";

Whether you are using Dub's [API](/api-reference/introduction) or not, this page is a quick way to understand how Dub works.

Within Dub, all data belongs to a [**Workspace**](#workspace). Within a workspace, you have [Links](#links), [Domains](#domains), [Tags](#tags), and more.

## Workspace

[Workspaces](https://dub.co/help/article/what-is-a-workspace) is the defacto way of organizing your links and working with your team on Dub. You can think of a Dub workspace like a workspace on Slack or Discord – it's a shared space where you can [invite your team members](https://dub.co/help/article/how-to-invite-teammates) to collaborate on links.

When interacting with Dub's API, you will also need to specify the [Workspace ID](/api-reference/introduction#workspace-id) to perform any operation. You can find the workspace ID under the **General** settings page of your workspace.

<Accordion title="Workspace model">
  <WorkspaceResponse />
</Accordion>

## Links

Links are the bread and butter of Dub. You can shorten any URL to a Dub link, which you can then share with your audience. Links can be [created](/api-reference/endpoint/create-a-new-link), [updated](/api-reference/endpoint/edit-a-link), and [deleted](/api-reference/endpoint/delete-a-link) via the [Dub API](/api-reference/introduction) or the [Dub dashboard](https://app.dub.co).

<Accordion title="Link model">
  <LinkResponse />
</Accordion>

## Domains

On Dub, you can [add custom domains](https://dub.co/help/article/how-to-add-custom-domain) to create branded short links for better brand recognition. You can also [set a primary domain](https://dub.co/help/article/how-to-set-primary-domain) for it to be used as the default domain for new links (both via the API and the dashboard).

<Accordion title="Domain model">
  <DomainResponse />
</Accordion>

## Tags

Tags are a way to organize your links. You can [add tags to your links](https://dub.co/help/article/how-to-use-tags) to categorize them and make them easier to find. You can also [filter analytics by tags](https://dub.co/blog/introducing-tags#filtering-analytics-by-tags) to get a better understanding of how your campaigns are performing.

<Accordion title="Tag model">
  <TagResponse />
</Accordion>
